n = int(input())
a = n // 100  # 计算出百元数量
n = n - a * 100 #减掉百元后的钱
b = n // 50
n = n - b * 50
c = n // 20
n = n - c * 20
d = n // 10
n = n - d * 10
e = n // 5
n = n - e * 5

print("%d\n%d\n%d\n%d\n%d\n%d" %(a,b,c,d,e,n))

'''
# 也可以使用分行输出
print(a)
print(b)
print(c)
print(d)
print(e)
print(n)
'''

